package org.despair2D.ui 
{
	import org.despair2D.ui.supportClasses.AbstractMovieClipButton;
	
	import org.despair2D.core.ns_despair;
	use namespace ns_despair;
	
public class Button extends AbstractMovieClipButton 
{
	
	public function Button( dataName:String ) 
	{
		super(dataName);
	}
	
	
	final override ns_despair function onRelease() : void
	{
		m_movieClip.gotoAndStop(m_prop.release)
	}
	
	final override ns_despair function onPress() : void
	{
		m_movieClip.gotoAndStop(m_prop.press)
	}
	
	final override ns_despair function onLeave() : void
	{
		if (this.pressed)
		{
			m_movieClip.gotoAndStop(m_prop.leave)
		}
	}
	
	final override ns_despair function onHover() : void
	{
		if (this.pressed)
		{
			m_movieClip.gotoAndStop(m_prop.hover)
		}
	}
	
	final override ns_despair function onInvalid() : void
	{
		m_movieClip.gotoAndStop(m_prop.invalid)
	}
}
}